﻿<UserControl x:Class="PokemonBattleOnline.PBO.Editor.TeamView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:ui="clr-namespace:PokemonBattleOnline.PBO.Elements"
             xmlns:e="clr-namespace:PokemonBattleOnline.PBO.Editor"
             Loaded="OnLoaded" Height="32" Width="292">
    <Grid Margin="3,0">
        <Grid.Style>
            <Style TargetType="Grid">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding CanBattle}" Value="False">
                        <Setter Property="Opacity" Value="0.5"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </Grid.Style>
        <Rectangle IsHitTestVisible="False" Margin="0,2">
            <Rectangle.Fill>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                    <GradientStop Color="#80ffffff" Offset="0.5"/>
                    <GradientStop Color="#00ffffff" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <!--<Path Name="bg" Fill="{x:Static ui:SBrushes.GrayB1}" Stroke="{Binding BorderBrush}" Data="M0,9 L391,9 385,32 0,32" StrokeThickness="0" Stretch="None" VerticalAlignment="Bottom" SnapsToDevicePixels="True"/>-->
        <TextBlock x:Name="NameBlock" Focusable="False" Text="{Binding Name}" MouseLeftButtonDown="NameBlock_MouseLeftButtonDown" Cursor="IBeam" TextTrimming="CharacterEllipsis" TextWrapping="WrapWithOverflow" Background="Transparent" Padding="14,8,205,8"/>
        <CheckBox x:Name="BattleCheckBox" Visibility="Collapsed" Focusable="False" IsTabStop="False" IsChecked="{Binding CanBattle}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
        <TextBox x:Name="NameEditor" KeyDown="NameEditor_KeyDown" LostFocus="NameEditor_LostFocus" IsTabStop="False" Visibility="Collapsed" MaxLength="30" Padding="0" BorderThickness="0" BorderBrush="{x:Null}" SnapsToDevicePixels="True" Background="White" VerticalAlignment="Center" Margin="12,0,205,0"/>
        <StackPanel Focusable="False" Margin="0,0,10,0" HorizontalAlignment="Right" Orientation="Horizontal">
            <e:PokemonIcon Focusable="False" DataContext="{Binding [0]}"/>
            <e:PokemonIcon Focusable="False" DataContext="{Binding [1]}"/>
            <e:PokemonIcon Focusable="False" DataContext="{Binding [2]}"/>
            <e:PokemonIcon Focusable="False" DataContext="{Binding [3]}"/>
            <e:PokemonIcon Focusable="False" DataContext="{Binding [4]}"/>
            <e:PokemonIcon Focusable="False" DataContext="{Binding [5]}"/>
        </StackPanel>
        <Button x:Name="Remove" Click="Remove_Click" Style="{x:Static ui:Controls.XButton}" ToolTip="全队删除" Focusable="False" IsTabStop="False" Foreground="#f08080" Visibility="Collapsed" HorizontalAlignment="Right" Margin="0,5,0,0"/>
    </Grid>
</UserControl>
